const gulp =require('gulp');
const cssmin = require('gulp-cssmin');
const autoprefixer = require('gulp-autoprefixer');
const uglify = require('gulp-uglify');
const babel = require('gulp-babel');
const htmlmin = require('gulp-htmlmin');
/* 创建一个css任务 */
gulp.task('css',()=>{
   return gulp.src('./css/**')
              .pipe(autoprefixer({
                overrideBrowserslist:["last 5 version","iOS > 3","Firefox > 2"]
           }))
              .pipe(cssmin())
              .pipe(gulp.dest('./dist/css'))
})
/* 创建一个js任务 */
gulp.task('js', function () {
    return gulp
    	.src('./js/**')
    	.pipe(babel({
        	presets: ['es2015']
    	}))
    	.pipe(uglify())
    	.pipe(gulp.dest('./dist/js'))
})
